using System;
using System.ComponentModel;
using System.Drawing;
using System.Xml.Serialization;

namespace DataAccessLayer
{
    [Serializable, XmlType("GameObject")]
    [XmlInclude(typeof(Aircraft))]
    [XmlInclude(typeof(Anomaly))]
    [XmlInclude(typeof(BulletBase))]
    public abstract class GameObject
    {
        [XmlAttribute]
        public int ID { get; set; }

        [Browsable(false)]
        [XmlElement]
        public string TextureName { get; set; }

        [Browsable(false)]
        [XmlElement]
        public EditorRect SourceRect { get; set; }

        [Browsable(false)]
        [XmlElement]
        public EditorVector2 Position { get; set; }

        protected GameObject()
        {
            TextureName = "";
            SourceRect = new Rectangle();
            Position = new EditorVector2();
        }
    }
}